package com.gxt.riaapp.client.mvc.model;

import java.io.Serializable;

import com.extjs.gxt.ui.client.Style.HideMode;
import com.extjs.gxt.ui.client.data.BaseTreeModel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;

public class Category extends BaseTreeModel implements Serializable {
	protected Category() {
	}

	public Category(String name) {
		set("name", name);
	}
	public Category(String name, String id) {
		set("name", name);
		set("id", id);
	}
	public String getId(){
		return  (String)get("id");
	}
	public String getName() {
		return (String) get("name");
	}

	public String toString() {
		return getName();
	}

	public void add(String title, LayoutContainer page, String image) {
		add(new Entry(title, page, image));
	}

	public void add(String title, LayoutContainer page, String image,
			boolean fill) {
		add(new Entry(title, page, image, fill));
	}

	public void add(String title, LayoutContainer page) {
		add(new Entry(title, page ));
	}
	
	public void add(String title, String id, LayoutContainer page) {
			add(new Entry(title, id,  page ));
	}

	public void add(String title, LayoutContainer page, String image,
			boolean fill, boolean closable, HideMode hideMode) {
		add(new Entry(title, page, image, fill, closable, hideMode));
	}
	
	public void add(String title, String id) {
		add(new Entry(title, id ));
	}
}
